<template>
	<el-drawer title="人事调动详情" v-model="visible" :size="800" destroy-on-close @closed="$emit('closed')">
		<el-container v-loading="loading">
			<el-main>
				<el-form>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="排序号" prop="sortNo">{{form.sortNo}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="文件标题" prop="title">{{form.title}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="调动人员" prop="userId">{{form.userName}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="调动类型" prop="transferType">{{form.transferTypeName}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="调动日期" prop="transferTime">{{form.transferTime}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="生效日期" prop="startTime">{{form.startTime}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="调动前单位名称" prop="compName">{{form.compName}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="调动后单位名称" prop="transferComp">{{form.transferComp}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="调动前部门名称" prop="deptName">{{form.deptName}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="调动后部门名称" prop="transferDept">{{form.transferDept}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="调动前职务名称" prop="levelName">{{form.levelName}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="调动后职务名称" prop="transferLevel">{{form.transferLevel}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-form-item label="调动手续办理">{{form.transferCondition}}
					</el-form-item>
					<el-form-item label="备注说明">{{form.remark}}
					</el-form-item>
					<el-form-item label="相关附件" v-if="form.attachId!=''">
						<attach-menu :attachIds="form.attachId" :roleFlag="3" :preview="true" ></attach-menu>
					</el-form-item>
				</el-form>
				<el-footer style="text-align: center;">
					<el-button @click="visible=false">关闭</el-button>
				</el-footer>
			</el-main>
		</el-container>
	</el-drawer>
</template>

<script>
import AttachMenu from '@/views/module/attachMenu'
export default {
	emits: ['success', 'closed'],
	components: {
		AttachMenu,
	},
	data() {
		return {
			loading: false,
			form: {
				transferId: '',
				sortNo: '',
				title: '',
				userName: '',
				transferTypeName: '',
				transferTime: '',
				startTime: "",
				compName: '',
				transferComp: '',
				deptName: '',
				transferDept: '',
				levelName: '',
				transferLevel: '',
				transferCondition: '',
				attachId: '',
				remark: ''
			},
			visible: false,
			isSaveing: false,
		}
	},
	mounted() {

	},
	methods: {
		//显示
		open(model){
			this.model=model;
			this.visible = true;
			return this;
		},
		//表单注入数据
		setData(data){
			this.form.transferId = data.transferId
			this.form.sortNo = data.sortNo
			this.form.userName = data.userName
			this.form.title = data.title
			this.form.transferTypeName = data.transferTypeName
			this.form.transferTime = data.transferTime
			this.form.startTime = data.startTime
			this.form.compName = data.compName
			this.form.transferComp = data.transferComp
			this.form.deptName = data.deptName
			this.form.transferDept = data.transferDept
			this.form.levelName = data.levelName
			this.form.transferLevel = data.transferLevel
			this.form.transferCondition = data.transferCondition
			this.form.attachId = data.attachId
			this.form.remark = data.remark
		},
	}
}
</script>

<style>
</style>
